home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbasicpg.zip
/
DEFFN_EX.BAS
< prev
next >
Wrap
BASIC Source File
|
1988-09-17
|
270b
|
15 lines
'
' *** DEFFN_EX.BAS - DEF FN function programming example
'
DEF FNFactorial#(X)
STATIC Tmp#, I
Tmp#=1
FOR I=2 TO X
Tmp#=Tmp#*I
NEXT I
FNFactorial#=Tmp#
END DEF
INPUT "Enter a number: ",Num
PRINT Num "factorial is" FNFactorial#(Num)